package com.dmjy.boot.common.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.Accessors;

/**
 * boolean类型枚举
 *
 * @author 敖癸
 * @formatter:on
 * @since 2023/12/12
 */
@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public enum BoolEnum implements IEnum<Boolean> {
    TRUE(true, "真"),
    FALSE(false, "假");

    @JsonValue
    private final Boolean value;
    private final String description;

    @JsonCreator
    public static BoolEnum getInstance(Boolean value){
        return IEnum.instance(BoolEnum.class, value);
    }

}
